#ifndef COINBUTTON_H
#define COINBUTTON_H

#include <QMainWindow>
#include <QPushButton>
#include <QPainter>
#include <QPixmap>
#include <QTimer>

class CoinButton : public QPushButton
{
    Q_OBJECT
public:
    explicit CoinButton(QWidget *parent = nullptr);

    int getStat() const;
    void setStat(int value);

    //金币翻转动画
    void setStatWithANimation(int stat);
    //金币反转
    void filp();

signals:

public slots:
protected:
    void paintEvent(QPaintEvent *ev);
private:
    int stat;
    int fram;
    QTimer timer;
};

#endif // COINBUTTON_H
